<div ng-controller="bpmManagerProcessinstanceController" >
    <div class="bg-light lter b-b wrapper-md">
        <h1 class="m-n font-thin h3">运行中流程实例</h1>
    </div>
    <div class="panel panel-default m-b-none">
  		<div class="panel-body">
  			<form class="form-inline" role="form">
				<div class="form-group">
					<input class="form-control" placeholder="流程实例ID"  ng-model="params.processInstanceId.term">
				</div>
				<div class="form-group">
					<button type="button" class="btn btn-default form-control" ng-click="Table1.load()">查询</button>
				</div>
				<div class="form-group">
					<button type="button" class="btn btn-default form-control" ng-click="Table1.reset()">清空</button>
				</div>
			</form>
  		</div>
  	</div>
	<div class="wrapper-md no-padder">
		<div class="panel panel-default">
			<table class="table m-b-none" app-footable data-page="false" data-filter-text-only="true">
				<thead>
					<tr>
						<th data-sort-name="id">流程实例ID</th>
						<th data-sort-name="processDefinitionId">流程定义ID</th>
						<th data-sort-ignore="true">流程名称</th>
						<th data-sort-ignore="true">流程版本</th>
						<th data-sort-name="businessKey">业务KEY</th>
						<th data-sort-name="startUserId">状态</th>
						<th data-sort-ignore="true">操作</th>
					</tr>
				</thead>
				<tbody>
					<tr ng-repeat="r in Table1.page.rows">
						<td>
							<a app-auth ui-sref="app.bpm.manager.process.trace.view({executionId:r.id })" ng-bind="r.id"></a>
						</td>
						<td ng-bind="r.processDefinitionId"></td>
						<td ng-bind="r.processDefinitionId | bpmManagerProcessDefinitionFilter : 'name'"></td>
						<td ng-bind="r.processDefinitionId | bpmManagerProcessDefinitionFilter : 'version'"></td>
						<td ng-bind="r.businessKey"></td>
						<td ng-bind="r.suspended | dictionaryFiter : 'suspended'"></td>
						<td>
							<a ng-click="delete(r.id)" ><i class="glyphicon glyphicon-remove"></i>删除</a> 
							<a ng-if="!r.suspended" ng-click="changeState(r)" ><i class="glyphicon glyphicon-stop"></i>停用</a> 
							<a ng-if="r.suspended" ng-click="changeState(r)" ><i class="glyphicon glyphicon-play"></i>启用</a> 
						</td>
					</tr>
				</tbody>
				<tfoot>
					<tr>
						<td colspan="7" class="text-center">
							<div app-pagination="Table1"></div>
						</td>
					</tr>
				</tfoot>
			</table>
		</div>
	</div>
</div>